home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 002 / ws100.bas < prev    next >
BASIC Source File  |  1988-11-09  |  3KB  |  69 lines

  1. 60 MAXFILES=2:P$="COM:38N1D"
  2. 100 CLS:PRINT@45,"WORDSTAR TRANSMISSION PROGRAM"
  3. 110 PRINT:PRINT " Default protocol uses the RS-232"
  4. 120 PRINT " modem at 300 baud with 8 bit, No parity";
  5. 130 PRINT " 1 Stop bit & Xon disabled."
  6. 170 PRINT:PRINT "Would you like to change the defaults? ";
  7. 180 GOSUB 990:A%=(INSTR("YyNn",I$)+1)/2
  8. 190 IF A%<>0 THEN ON A% GOTO 380,230 ELSE 170
  9. 230 CLS:INPUT"Name of file to send ";FI$
  10. 235 IF RIGHT$(FI$,3)=".do" THEN GOTO 260
  11. 240 A%=INSTR(FI$,".do"):IF A%<>0 THEN 260
  12. 250  FI$ = FI$+".do"
  13. 260 OPEN FI$ FOR INPUT AS 1
  14. 270 OPEN P$ FOR OUTPUT AS 2
  15. 275 CLS:PRINT@45, "Ready to send..."
  16. 276 PRINT:PRINT " Open a BINARY file for input on the PC":PRINT:PRINT "      
  17. press any key when ready"
  18. 277 GOSUB 990:GOTO 278
  19. 278 CLS:PRINT@175, "working..."
  20. 280 C$= INPUT$(1,1)
  21. 290 PRINT #2, C$;
  22. 300 IF EOF(1) THEN PRINT #2, CHR$(26) ELSE GOTO 280
  23. 310 CLS:PRINT:PRINT:PRINT "                  DONE!":CALL 21179
  24. 320 PRINT "    PRESS ANY KEY TO CONTINUE":GOSUB 990: GOTO 60
  25. 380 CLS
  26. 390 PRINT"Baud rate selection":PRINT
  27. 400 PRINT"0 - Modem (300)*   5 - 1200 baud"
  28. 410 PRINT"1 - 75 baud        6 - 2400 baud"
  29. 420 PRINT"2 - 110 baud       7 - 4800 baud"
  30. 430 PRINT"3 - 300 baud       8 - 9600 baud"
  31. 440 PRINT"4 - 600 baud       9 - 19200 baud"
  32. 450 PRINT "Choice ? ";:GOSUB 990
  33. 460 P1=ASC(I$)-48:IF P1<0 THEN 380 ELSE IF P1>9 THEN 380
  34. 470 P1$=I$
  35. 510 CLS:PRINT"Word length selection"
  36. 520 PRINT:PRINT"6 - 6 bits"
  37. 530 PRINT"7 - 7 bits"
  38. 540 PRINT"8 - 8 bits *"
  39. 550 PRINT"Choice ? ";:GOSUB 990
  40. 560 P2=VAL(I$):IF P2<6 THEN 510 ELSE IF P2>8 THEN 510 ELSE P2$=I$
  41. 600 CLS:PRINT"Parity Selection"
  42. 610 PRINT:PRINT" I - Ignore parity"
  43. 620 PRINT" O - Odd parity"
  44. 630 PRINT" E - Even paruty"
  45. 640 PRINT" N - No parity *"
  46. 650 PRINT"Choice ? ";:GOSUB 990
  47. 660 A%=(INSTR("IiOoEeNn",I$)+1)/2
  48. 670 IF A%<1 THEN 600 ELSE IF A%>4 THEN 600
  49. 680 P3$=MID$("IOEN",A%,1)
  50. 720 CLS:PRINT"Stop Bit Selection"
  51. 730 PRINT:PRINT" 1 - 1 stop bit *"
  52. 740 PRINT" 2 - 2 stop bits"
  53. 750 PRINT:PRINT"Choice ?";:GOSUB 990
  54. 760 A%=VAL(I$):IF A%<1 THEN 720 ELSE IF A%>2 THEN 720
  55. 770 IF A%=1 THEN P4$="1" ELSE P4$="2"
  56. 810 CLS:PRINT"Line Status Selection"
  57. 820 PRINT:PRINT" E - Enable (XON)"
  58. 830 PRINT" D - Disable (XOFF) *"
  59. 840 PRINT:PRINT"Choice ?";:GOSUB 990
  60. 850 A%=(INSTR("EeDd",I$)+1)/2
  61. 860 IF A%<1 THEN 810 ELSE IF A%>2 THEN 810
  62. 870 P5$=MID$("ED",A%,1)
  63. 880 IF P1$="0" THEN P$="MDM:"+P2$+P3$+P4$+P5$:CALL 21200:GOTO 930
  64. 890 P$="COM:"+P1$+P2$+P3$+P4$+P5$
  65. 930 PRINT:PRINT"Your selection was "; P$:PRINT"Is this OK? "
  66. 940 GOSUB 990:A%=(INSTR("YyNn",I$)+1)/2
  67. 950 IF A%=1 THEN 230 ELSE IF A%=2 THEN 380 ELSE 940
  68. 990 I$=INKEY$:IF I$="" THEN 990 ELSE RETURN
  69.